@layout("/common/_container.html"){
<style>
    #accountArrears{
        height: 38px;
        width: 30%;
        border: 1px solid #999999;
        border-radius: 5px;
        padding-left: 10px;
    }
    #modify_arrears{
        background: #30add1;
        color: white;
    }
</style>
<div class="ibox float-e-margins ">
    <div class="ibox-content" id="addVisitedInfoForm">
        <div style="display: none">
            <input type="hidden" id="reservationsIdValue" value="${reservationsId}">
            <input type="hidden" id="accountArrearsValue" value="${accountArrears}">
        </div>
        <div style="text-align: center;margin-top: 20px;">
            <input type="text" id="accountArrears" value="${accountArrears}">
            <button type="button" class="btn" id="modify_arrears">修改</button>
        </div>
    </div>
</div>
<script>
    $("#modify_arrears").click(function () {
        var reservationsId = $("#reservationsIdValue").val();
        var accountArrears = $("#accountArrears").val();
        $.ajax({
            type: "POST",
            url:  "${ctxPath}/consultant/update_accountArrears" ,
            data: {
                reservationsId:reservationsId,
                accountArrears:accountArrears
            },
            dataType: "json",
            success: function (data) {
                alert("修改成功！")
                window.parent.Customer.table.refresh();
                var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                parent.layer.close(index);
            }
        });
    })
</script>
@}
